<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<div class="block">
    
    <div class="block_head">
        <div class="bheadl"></div>
        <div class="bheadr"></div>
        
        <h2>Land Cost History At ${locationName}</h2>
        <ul>
            <li>
                <html:link action="/admin/costHistoryListing.do" >
                    Back to the list
                </html:link>
            </li>
        </ul>
    </div>
    <!-- .block_head ends -->
    
    <div class="block_content clearfix">
        
        
        <logic:present name="costHistory">
            
            <html:form styleClass="chart_form" action="/admin/costHistory.do" method="get">
                <html:hidden property="locationID" />
                <div class="chart_mode_wrapper clearfix">
                    <div class="content">
                        <a class="item submit table_mode gray">Table</a>
                        <a class="item submit chart_mode ">Chart</a>
                        <logic:notEmpty name="yearList">
                            <span class="item">
                                <label>Year:</label>
                                <html:select styleClass="chzn-select chart_year" property="year">
                                    <logic:iterate id="year" name="yearList">
                                        <html:option value="${year}">${year}</html:option>
                                    </logic:iterate>
                                </html:select>
                            </span>
                        </logic:notEmpty>
                    </div>
                </div>
            </html:form>
            
            <table class="stats" rel="line" cellpadding="0" cellspacing="0" width="100%">
                <caption>Land Cost in Year ${selectYear}</caption>
                <thead>
                    <tr>
                        <td>&nbsp;</td>
                        <logic:iterate id="cost" name="costHistory">
                            <th scope="col">${cost[0]}</th>
                        </logic:iterate>
                    </tr>
                </thead>
                
                <tbody>
                    <tr>
                        <th scope="row">Land Cost At ${locationName}</th>
                        <logic:iterate id="cost" name="costHistory">
                            <td>${cost[1]}</td>
                        </logic:iterate>
                    </tr>
                    <tr>
                        <th scope="row">AVG Land Cost</th>
                        <logic:iterate id="cost" name="costHistory">
                            <td>${cost[2]}</td>
                        </logic:iterate>
                    </tr>
                </tbody>
            </table>
            
        </div>
        <!-- .block_content ends -->
        </logic:present>
    
    <div class="bendl"></div>
    <div class="bendr"></div>
    
</div>
<!-- .block ends -->
